<%@ page import="org.ikastola.Discount" %>



<div class="fieldcontain ${hasErrors(bean: discountInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="discount.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="name" required="" value="${discountInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: discountInstance, field: 'value', 'error')} required">
	<label for="value">
		<g:message code="discount.value.label" default="Value" />
		<span class="required-indicator">*</span>
	</label>
	<input type="number" name="value" value="${discountInstance?.value}" step="${ikastola.Constants.DOUBLE_STEP}" title="El valor debe comenzar con un n&uacute;mero, usar punto como separador de decimal y redondear a 0.05." id="value"/> 
</div>

<div class="fieldcontain ${hasErrors(bean: discountInstance, field: 'description', 'error')} required">
	<label for="description">
		<g:message code="discount.description.label" default="Description" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="description" required="" value="${discountInstance?.description}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: discountInstance, field: 'fee', 'error')} ">
	<label for="fee">
		<g:message code="discount.fee.label" default="Aplica sobre" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="fee" optionValue="${{it.name}}" from="${org.ikastola.Fee.list()}" optionKey="id" value="${discountInstance?.fee}" class="many-to-one" />
</div>

